Skip to content

New test for freestyle project#430

Open
LB-RR wants to merge 1 commit intomainfrom
feature/test_freestyle_project3
Open

New test for freestyle project#430
LB-RR wants to merge 1 commit intomainfrom
feature/test_freestyle_project3

Conversation

@LB-RR
Copy link
Copy Markdown
Collaborator

@LB-RR LB-RR commented Apr 26, 2026

No description provided.

browser.find_element(By.XPATH, "//span[@class='jenkins-mobile-hide' and text()='Jenkins']").click()

assert "Free" in browser.page_source
time.sleep(3)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Вконец слип не нужен точно.
И убери лишние пустые строки после функции.

browser.find_element(By.XPATH, "//input[@id='name']").send_keys("Free")
browser.find_element(By.XPATH, "//span[@class='label' and text()='Freestyle project']").click()
browser.find_element(By.XPATH, "//button[@id='ok-button']").click()
time.sleep(3)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А тут со слипом 1 сек не работает?

time.sleep(3)
browser.find_element(By.XPATH, "//span[@class='jenkins-mobile-hide' and text()='Jenkins']").click()

assert "Free" in browser.page_source
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert "Free" in browser.page_source - я считаю это очень плохой практикой, такой ассерт. Тест может пройти если не создалась джоба. Лучше конкретный элемент проверять(текст какой то который появился(название джобы например) )

@StasAxlS
Copy link
Copy Markdown
Collaborator

StasAxlS commented Apr 26, 2026

Нет ссылки на карточку TC(АТ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants